package com.scalar.chiptrack.operations.process.parser;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;

/**
 * User: Sujan
 * Date: Jul 14, 2008
 * Time: 3:10:44 PM
 */
public class Activity implements Serializable
{
    private String id;
    private String type;
    private String name;
    private String processStepId;
    private String partNumber;
    private Map parameters = new HashMap();
    private String dupPartNumbers;
    private String comments;
    private ArrayList vendors = new ArrayList();
    private String partStatus="Prod";
    private boolean binsRequired=false;
    private String goodBinNumber="1";
    private String rejectedBinNumber="1";
    private String mktPartNumber;
    private boolean isApprovedProduct=true;
    private ArrayList bomParts = new ArrayList();
    private int x=20;
    private int y=40;
    private int w=130;
    private int h=30;
    private boolean primaryFGPN = false;

    public boolean isBinsRequired() {
        return binsRequired;
    }

    public void setBinsRequired(boolean binsRequired) {
        this.binsRequired = binsRequired;
    }

    public String getGoodBinNumber() {
        return goodBinNumber;
    }

    public void setGoodBinNumber(String goodBinNumber) {
        this.goodBinNumber = goodBinNumber;
    }

    public String getRejectedBinNumber() {
        return rejectedBinNumber;
    }

    public void setRejectedBinNumber(String rejectedBinNumber) {
        this.rejectedBinNumber = rejectedBinNumber;
    }

    public String getMktPartNumber() {
        return mktPartNumber;
    }

    public void setMktPartNumber(String mktPartNumber) {
        this.mktPartNumber = mktPartNumber;
    }

    public boolean isApprovedProduct() {
        return isApprovedProduct;
    }

    public void setApprovedProduct(boolean approvedProduct) {
        isApprovedProduct = approvedProduct;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBounds() {
        return "X:"+x+";Y:"+y+";W:"+w+";H:"+h;
    }    

    public String getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(String processStepId) {
        this.processStepId = processStepId;
    }

    public String getPartNumber() {
        return partNumber;
    }

    public void setPartNumber(String partNumber) {
        this.partNumber = partNumber;
    }

    public Map getParameters() {
        return parameters;
    }

    public void setParameters(Map parameters) {
        this.parameters = parameters;
    }

    public String getDupPartNumbers() {
        return dupPartNumbers;
    }

    public void setDupPartNumbers(String dupPartNumbers) {
        this.dupPartNumbers = dupPartNumbers;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public ArrayList getVendors() {
        return vendors;
    }

    public void setVendors(ArrayList vendors) {
        this.vendors = vendors;
    }

    public String getPartStatus() {
        return partStatus;
    }

    public void setPartStatus(String partStatus) {
        this.partStatus = partStatus;
    }
    public void addVendor ( String vendorName )
    {
        if ( vendorName != null && vendorName.trim().length() > 0 )
        {
            Vendor vendor = new Vendor();
            vendor.setLocationName( vendorName + "/" );
            this.vendors.add ( vendor );
        }
    }
    public void setParameter ( String paramName, String paramValue )
    {
        this.parameters.put( paramName, paramValue );
    }

    public ArrayList getBomParts() {
        return bomParts;
    }

    public void setBomParts(ArrayList bomParts) {
        this.bomParts = bomParts;
    }
    public void addBomPart ( String bomPart )
    {
        if ( bomPart != null && bomPart.trim().length() > 0 )
        {
            bomParts.add( bomPart );
        }
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getW() {
        return w;
    }

    public void setW(int w) {
        this.w = w;
    }

    public int getH() {
        return h;
    }

    public void setH(int h) {
        this.h = h;
    }

    public boolean isPrimaryFGPN() {
        return primaryFGPN;
    }

    public void setPrimaryFGPN(boolean primaryFGPN) {
        this.primaryFGPN = primaryFGPN;
    }
}
